<?php
if(!isset($n1)) {$n1="";}
if(!isset($n2)) {$n2="";}
if(!isset($toto)) {$toto="";}
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>Calculatrice</title>
        <link href="bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet">
        <style>
            .form-control {
                width: 150px;
            }
        </style>
    </head>
    <body>
        <?php
        // put your code here
        ?>
        <form id="form1" name="form1" action="traitement_formulaire.php" method="post">
            <div><input type="number" id="nb1" name="nb1" value="<?php echo $n1; ?>" class="form-control"></div>
            <div><input type="number" id="nb2" name="nb2" value="<?php echo $n2; ?>" class="form-control"></div>
            <div>
                <select id="cb_op" name="cb_op" class="form-control">
                <option value='1'>+</option>
                <option value='2'>-</option>
                <option value='3'>x</option>
                <option value='4'>:</option>
                </select>
            </div>
            <div><button type="submit" id="bouton" class = "btn btn-success"><span class="glyphicon glyphicon-list-alt"></span>Calculer</button></div>
            <div><input type="number" id="nbRes" name="nbRes" class="form-control" value="<?php echo $toto; ?>" readonly="readonly"></div>
        </form>
        
    </body>
</html>
